How the heck do I create an "@ngdoc" service?
Docular is still built to parse the original AngularJS source code to provide as close to the same documentation as seen on the AngularJS site.
Therefore, following the AngularJS code as an example for Docular is perfectly fine with a few exceptions.
AngularJS has a few special naming conventions of their document ids that do not follow "the rules".
If you look at the AngularJS source, you see this example:
/** * @ngdoc function * @name ng.$anchorScroll * @requires $window * @requires $location * @requires $rootScope * * @description * When called, it checks current value of `$location.hash()` and scroll to related element, * according to rules specified in * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}. * * It also watches the `$location.hash()` and scroll whenever it changes to match any anchor. * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`. */
This is the documentation syntax for the anchorScroll service. You notice however, that AngularJS has a naming convention that assumes that anything that has this form "
Therefore, you have two choices in putting documentation objects into the "service" module section. You can either follow the "$" prefix and not specify a module section, or you can use the normal naming convention and provide the module section.